package com.yms.juc.daemon;

import java.io.InterruptedIOException;

/**
 * @version : 1.0
 * @author: yangmingsong
 * @date: 2022/7/22-07-22-16:25
 * @description: spring5Test
 */
public class Test {

    public static void main(String[] args) throws InterruptedException {
        Thread thread = new Thread(new Daemon());
        thread.setDaemon(true);
        thread.start();
        Thread.sleep(100);
        if (thread.isInterrupted()) {
            System.out.println("被");
        }
    }

}
class Daemon implements Runnable{

    @Override
    public void run() {
        System.out.println("被终止了");
    }
}
